#include <iostream>
#include <vector>

int main(int argc, char* argv[])
{
    std::vector<int> vi(100);
    // vi.resize(100);
    for(int i = 0; i != 100; i++)
    {
        vi.push_back(i);
        int * p2 = &(*vi.begin());
        std::cout << "testcpp:"<< i << ":" << vi.capacity()<<":"<< vi.size()<<":"<< p2 <<"-"<<*p2<<std::endl;
    }
    std::cout << "testcpp:"<< &vi << ":"<< vi.capacity()<<":"<< vi.size() <<std::endl;
    int * p1 = (int*)&vi;
    for(std::vector<int>::iterator i = vi.begin(); i != vi.end(); i++)
    {
        int * p2 =&(*i);
        std::cout << *p2<<":" << (char*)p2-(char*)p1 <<":" << p1<<":"<< p2 << ":" << vi.capacity()<<":"<< vi.size() <<std::endl;
        p1 =  p2;
    }
    exit(0);
}